package com.fwj.common.api;

import com.alibaba.fastjson.JSONObject;
import com.fwj.common.entity.Attachment;
import com.fwj.core.common.model.ResponseDTO;
import com.fwj.user.entity.user.UserBaseInfo;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @Author: fwj
 * @Data: 2022/4/15 15:10
 * @Version 1.0
 * @Description:
 */


public interface AttachmentService {

    /**
     * 文件上传
     * */
    ResponseDTO upload(MultipartFile[] files, Attachment attachment, UserBaseInfo userBaseInfo);

    /**
     * 文件下载
     * */
    ResponseDTO download(JSONObject jsonObject, HttpServletRequest request, HttpServletResponse response);

    /**
     * 附件删除接口,伪删除，标记附件状态为FalseDeleted
     * */
    ResponseDTO delete(JSONObject jsonObject);

    /**
     * 附件真实删除接口,伪删除，标记附件状态为Deleted
     * */
    ResponseDTO realDelete(List<String> keys);
}
